/**
* SECTION:gtkbindings
- * @Title: GtkBindings
+ * @Title: Bindings
* @Short_description: Key bindings for individual widgets
- * @See_also: <link linkend="gtk-keyboard-accelerators">Keyboard Accelerators</link>, #GtkCssProvider
+ * @See_also: Keyboard Accelerators, Mnemonics, #GtkCssProvider
*
- * GtkBinding provides a mechanism for configuring GTK+ key bindings
+ * #GtkBindingSet provides a mechanism for configuring GTK+ key bindings
* through CSS files. This eases key binding adjustments for application
* developers as well as users and provides GTK+ users or administrators
* with high key binding configurability which requires no application
* statement to apply the binding set to specific widget types. Details
* on the matching mechanism are described under
* <link linkend="gtkcssprovider-selectors">Selectors</link>
- * in the #GtkCssProvider documentation. Inside the binding-set definition,
+ * in the #GtkCssProvider documentation. Inside the binding set definition,
* key combinations are bound to one or more specific signal emissions on
* the target widget. Key combinations are strings consisting of an optional
* #GdkModifierType name and <link linkend="gdk-Keyboard-Handling">key names</link>
* of a #GtkEntry widget to the #GtkEntry::move-cursor signal (so movement
* occurs in 3-character steps), the following binding can be used:
* <informalexample><programlisting>
- * @binding-set "MoveCursor3"
+ * @binding-set MoveCursor3
* {
* bind "<Control>Right" { "move-cursor" (visual-positions, 3, 0) };
* bind "<Control>Left" { "move-cursor" (visual-positions, -3, 0) };
* works as expected. The same mechanism can not be used to "unbind"
* existing bindings, however.
* <informalexample><programlisting>
- * @binding-set "MoveCursor3"
+ * @binding-set MoveCursor3
* {
* bind "<Control>Right" { };
* bind "<Control>Left" { };
* implement word movement. To keep GTK+ from activating its default
* bindings, the "unbind" keyword can be used like this:
* <informalexample><programlisting>
- * @binding-set "MoveCursor3"
+ * @binding-set MoveCursor3
* {
* unbind "<Control>Right";
* unbind "<Control>Left";
* </para>
* </refsect2>
*/
+
/* --- defines --- */
#define BINDING_MOD_MASK() (gtk_accelerator_get_default_mod_mask () | GDK_RELEASE_MASK)
* Parses a signal description from @signal_desc and incorporates
* it into @binding_set.
*
- * signal descriptions may either bind a key combination to
+ * Signal descriptions may either bind a key combination to
* one or more signals:
* <informalexample><programlisting>
- * bind <replaceable>key</replaceable> {
- * <replaceable>signalname</replaceable> (<replaceable>param</replaceable>, ...)
+ * bind "key" {
+ * "signalname" (param, ...)
* ...
* }
* </programlisting></informalexample>
*
* Or they may also unbind a key combination:
* <informalexample><programlisting>
- * unbind <replaceable>key</replaceable>
+ * unbind "key"
* </programlisting></informalexample>
*
* Key combinations must be in a format that can be parsed by
* <para>
* In order to extend key bindings affecting different widgets, GTK+
* supports the @binding-set rule to parse a set of bind/unbind
- * directives, see #GtkBindingSet for the syntax supported
+ * directives, see #GtkBindingSet for the supported syntax. Note that
+ * the binding sets defined in this way must be associated with rule sets
+ * by setting the gtk-key-bindings style property.
+ * </para>
+ * <para>
+ * Customized key bindings are typically defined in a separate
+ * <filename>gtk-keys.css</filename> CSS file and GTK+ loads this file
+ * according to the current key theme, which is defined by the
+ * #GtkSettings:gtk-key-theme-name setting.
* </para>
* <example>
* <title>Using the @binding rule</title>
* @binding-set binding-set2 {
* bind "<alt>Right" { "move-cursor" (visual-positions, 3, 0) };
* bind "<alt>KP_space" { "delete-from-cursor" (whitespace, 1)
- * "insert-at-cursor" (" ") };
+ * "insert-at-cursor" (" ") };
* };
*
* GtkEntry {
result = settings_install_property_parser (class,
g_param_spec_string ("gtk-theme-name",
P_("Theme Name"),
- P_("Name of theme RC file to load"),
+ P_("Name of theme to load"),
"Raleigh",
GTK_PARAM_READWRITE),
NULL);
result = settings_install_property_parser (class,
g_param_spec_string ("gtk-key-theme-name",
P_("Key Theme Name"),
- P_("Name of key theme RC file to load"),
+ P_("Name of key theme to load"),
DEFAULT_KEY_THEME,
GTK_PARAM_READWRITE),
NULL);
* @Title: GtkStyle
*
* A #GtkStyle object encapsulates the information that provides the look and
- * feel for a widget. Each #GtkWidget has an associated #GTkStyle object that
- * is used when rendering that widget. Also, a #GtkStyle holds information for
- * the five possible widget states though not every widget supports all five
- * states; see #GtkStateType.
- *
- * Usually the #GtkStyle for a widget is the same as the default style that is
- * set by GTK+ and modified the theme engine.
- *
- * Usually applications should not need to use or modify the #GtkStyle of their
- * widgets.
+ * feel for a widget.
*
* <warning>
* In GTK+ 3.0, GtkStyle has been deprecated and replaced by #GtkStyleContext.
* </warning>
+ *
+ * Each #GtkWidget has an associated #GtkStyle object that is used when
+ * rendering that widget. Also, a #GtkStyle holds information for the five
+ * possible widget states though not every widget supports all five
+ * states; see #GtkStateType.
+ *
+ * Usually the #GtkStyle for a widget is the same as the default style that
+ * is set by GTK+ and modified the theme engine.
+ *
+ * Usually applications should not need to use or modify the #GtkStyle of
+ * their widgets.
*/